﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FontTool
{
    [Serializable]
    public class nFontPool : IEnumerable<nFont>
    {
        List<nFont> nFonts = new List<nFont>();

        public nFont this[int index]
        {
            get { return nFonts[index]; }
        }

        public void Add(nFont font)
        {
            nFonts.Add(font);
        }

        public void Insert(int index, nFont font)
        {
            nFonts.Insert(index, font);
        }

        public void RemoveAt(int index)
        {
            nFonts.RemoveAt(index);
        }

        public int IndexOf(nFont font)
        {
            return nFonts.IndexOf(font);
        }

        public int Count
        {
            get { return nFonts.Count; }
        }

        public IEnumerator<nFont> GetEnumerator()
        {
            return nFonts.GetEnumerator();
        }

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return this.GetEnumerator();
        }
    }
}
